package edu.ycu.aladdin.web.config;

import edu.ycu.aladdin.common.dao.NewsDataDao;
import edu.ycu.aladdin.common.dao.impl.NewsDataDaoImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.core.MongoTemplate;

/**
 * @author <a href="mailto:wangruihuano@gmail.com">王瑞环</a>
 * @since 1.0
 */
@Configuration
public class CommonDaoBeans {

    @Bean
    public NewsDataDao newsDataDao(MongoTemplate mongoTemplate){
        return new NewsDataDaoImpl(mongoTemplate);
    }
}
